<h2>Lägg till bransch</h2>

<div class="form_errors">
	<?php echo validation_errors(); ?>
</div>

<form method="post">
<table class='admin_datatable'>
	<thead><tr><td colspan="3">Ny huvudbransch</td></tr></thead>
	<tbody>
		<tr>
			<td>
				<label for="mbranch">Namn</label>
			</td>
			<td>
				<input type="text" name="mbranch" value="<?php set_value('mbranch');?>"/>
			</td>
			<td>
				<input type="submit" name="save" value="Lägg till"/>
			</td>
		</tr>
	</tbody>
</table>
</form>

<br/><br/><br/>

<form method="post">
<table class='admin_datatable'>
	<thead><tr><td colspan="3">Ny underbransch</td></tr></thead>
	<tbody>
		<tr>
			<td>Förälder</td>
			<td colspan="2">
				<select name="main_branch">
				<?php foreach($mbs as $mb):?>
					<option value='<?php echo $mb->id;?>'><?php echo $mb->name;?></option>
				<?php endforeach;?>
				</select>
			</td>
		</tr>
		<tr>
			<td>
				<label for="sbranch">Namn</label>
			</td>
			<td>
				<input type="text" name="sbranch" value="<?php set_value('sbranch');?>"/>
			</td>
			<td>
				<input type="submit" name="save" value="Lägg till"/>
			</td>
		</tr>
	</tbody>
</table>
</form>